Continuous communication method and apparatus of contactless communication device

ABSTRACT

An electronic device includes a communication interface operable to perform contactless communication with an external device; and a processor operable to control to determine a communication type to be performed with the external device; when the communication type is a first type of continuous communication, configure data in a long packet structure; when the communication type is a second type of discontinuous communication, configure data in a short packet structure; and perform data communication in the continuous communication or in the discontinuous communication with the external device on the basis of the determined communication type.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a Continuation Application of U.S. patentapplication Ser. No. 16/593,196, filed on Oct. 4, 2019, which is basedon and claims priority under 35 U.S.C. § 119 to Korean PatentApplication No. 10-2018-0118223, filed on Oct. 4, 2018, in the KoreanIntellectual Property Office, the disclosure of which is incorporatedherein by reference in its entirety.

BACKGROUND 1. Field

The present disclosure relates generally to a method and apparatus forcontinuous data transmission and reception in contactless communicationbetween contactless communication devices.

2. Description of Related Art

Near-field communication (NFC) technology may refer to contactless NFCtechnology using a frequency in a high-frequency band (e.g., about 13.56megahertz (MHz)). NFC technology is applied to electronic devices (e.g.,a mobile device or a smartphone) to provide interoperability in datacommunication between two devices (e.g. NFC devices), contactless smartcard technology, and wireless recognition technology. NFC technologyallows the use of services without a fee. NFC technology is increasinglybeing used for a variety of applications, such as inter-NFC devicecontact application services (e.g., payments, business card exchanges,and credit transfers), personal information-related application services(e.g., personal authentication services and access control services),information provision, or customized advertising services (e.g., touristinformation, medical care, parking, reservation, advertising/coupons,product information, content purchase, and social networking). NFCtechnology quickly and easily provides a communication service through asimple one touch process (e.g., touch-and-go).

However, in a communication mode based on NFC technology (hereinafter,NFC communication), in order to transmit/receive data, due to basicconstraints, it is necessary to separate two NFC devices from each otherand then to position the devices close to each other (e.g., proximity orvicinity operation properties), thereby enabling normal datatransmission and reception. For example, in NFC communication, one-offcommunication is quickly and easily performed only by placing NFCdevices having NFC technology close to each other. However, in order tocommunicate again after a first communication process, the two NFCdevices need to be separated and then to be placed close to each other,thus enabling communication. Accordingly, even though a magnetic field(e.g., an NFC field) is formed between the NFC devices (e.g., field on),a procedure from device checking to data transfer is repeatedly requiredafter one-time communication. Therefore, the current NFC communicationmethod using NFC technology causes inconvenience by repeatedly requiringmultiple communication iterations of transmitting and receiving fortransferring large-capacity data, or by requiring a plurality of shortor long data transmissions, as in cable-based communication (e.g.,universal asynchronous receiver/transmitter (UART) communication).

SUMMARY

The present disclosure has been made to address the above-mentionedproblems and disadvantages, and to provide at least the advantagesdescribed below.

In accordance with an aspect of the present disclosure, an electronicdevice includes a communication interface operable to performcontactless communication with an external device; and a processoroperable to control to determine a communication type to be performedwith the external device; when the communication type is a first type ofcontinuous communication, configure data in a long packet structure;when the communication type is a second type of discontinuouscommunication, configure data in a short packet structure; and performdata communication in the continuous communication or in thediscontinuous communication with the external device on the basis of thedetermined communication type.

In accordance with another aspect of the present disclosure, anoperating method of an electronic device includes determining acommunication type to be performed with an external device; when thecommunication type is a first type of continuous communication,configuring data in a long packet structure; when the communication typeis a second type of discontinuous communication, configuring data in ashort packet structure; and performing data communication in thecontinuous communication or in the discontinuous communication with theexternal device on the basis of the determined communication type.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certainembodiments of the present disclosure will be more apparent from thefollowing description taken in conjunction with the accompanyingdrawings, in which:

FIG. 1 is a block diagram illustrating an electronic device in a networkenvironment, according to an embodiment;

FIG. 2 illustrates a system configuration, according to an embodiment;

FIG. 3 schematically illustrates a continuous communication operationbetween electronic devices, according to an embodiment;

FIG. 4 illustrates a function processing module of an electronic device,according to an embodiment;

FIG. 5 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment;

FIG. 6 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment;

FIG. 7 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment;

FIG. 8 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment; and

FIG. 9 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

DETAILED DESCRIPTION

Various embodiments of the disclosure may include a computer-readablerecording medium having a program recorded thereon to perform the methodby a processor.

An electronic device and an operating method thereof may enable repeateddata transmission and reception without additionally separating andadjacently placing electronic devices (e.g., an initiator and a target)having contactless communication (e.g., NFC, radio frequencyidentification (RFID) communication, or magnetic secure transmission(MST) communication). Accordingly, an environment similar to acable-connection (e.g., UART communication) environment may beconfigured using a contactless communication function (e.g., NFCfunction).

A wireless interface technology capable of resolving a physicalconnection error through contactless communication-based continuouscommunication technology may be provided and frequently utilized.

Once a first electronic device (e.g., an initiator) and a secondelectronic device (e.g., a target) that perform contactlesscommunication are connected according to a particular protocol, it ispossible to continue two-way communication between the two electronicdevices using wireless continuous communication (e.g., wireless loopcommunication) without repeating an initialization setup operation(e.g., a session establishment operation) and a protocol setupoperation. Accordingly, it is possible to configure an environment thatcan be used in a similar manner to that of cable-connected interfacecommunication (e.g., UART communication).

A contactless communication mode may not require a separate electricalconnection, thereby avoiding failure due to errors in a physicalconnection between a cable and an electronic device. Continuouscommunication based on contactless communication may reduce set-up timefor communication compared to other wireless communication methods(e.g., Wi-Fi and Bluetooth™ technology) and may thus support fastcommunication. For example, NFC set-up time may be about 0.1 ms orshorter, while Bluetooth™ set-up time may be about 2 seconds or longerbecause it takes a considerable time for pairing and access environmentsetup according to a wireless standard. Further, in an environment wherethere are many electronic devices using different wireless communicationmethods (e.g., Wi-Fi and Bluetooth™), communication between electronicdevices may suffer serious interference or may be impossible due tochannel saturation. Therefore, when repeated data transmission andreception for only a short distance is enabled by adjusting the strengthof a magnetic field on the basis of contactless communication, it ispossible to form a wireless interface between two electronic deviceswithout cable connection which is similar to a cable-connectedenvironment, thus enabling data exchanges without restraint, and tominimize interference by neighboring devices. Additionally, it ispossible to enable continuous data communication during contactlesscommunication between electronic devices, thereby improving theusability, ease, accessibility, or competitiveness of electronicdevices.

A continuous communication method and a continuous communicationapparatus for an electronic device which are capable of configuring anenvironment similar to a cable-connection (e.g., UART communication)environment using a contactless communication (e.g., NFC, RFIDcommunication, or MST communication) function between electronic devicesare provided.

A continuous communication method and a continuous communicationapparatus which enable repeated data transmission and reception withoutany physical movement of electronic devices having contactlesscommunication technology are provided.

A continuous communication method and a continuous communicationapparatus for an electronic device which enable contactlesscommunication between electronic devices to be used in a similar mannerto that of general continuous data communication using a cable (e.g.,UART communication) are provided.

FIG. 1 is a block diagram illustrating an electronic device 101 in anetwork environment 100, according to an embodiment.

Referring to FIG. 1, the electronic device 101 in the networkenvironment 100 may communicate with an electronic device 102 via afirst network 198 (e.g., a short-range wireless communication network),or an electronic device 104 or a server 108 via a second network 199(e.g., a long-range wireless communication network). The electronicdevice 101 may communicate with the electronic device 104 via the server108. According to an embodiment, the electronic device 101 may include aprocessor 120, memory 130, an input device 150, a sound output device155, a display device 160, an audio module 170, a sensor module 176, aninterface 177, a haptic module 179, a camera module 180, a powermanagement module 188, a battery 189, a communication module 190, asubscriber identification module (SIM) 196, or an antenna module 197. Insome embodiments, at least one (e.g., the display device 160 or thecamera module 180) of the components may be omitted from the electronicdevice 101, or one or more other components may be added in theelectronic device 101. In some embodiments, some of the components maybe implemented as single integrated circuitry. For example, the sensormodule 176 (e.g., a fingerprint sensor, an iris sensor, or anilluminance sensor) may be implemented as embedded in the display device160 (e.g., a display).

The processor 120 may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 101 coupled with theprocessor 120, and may perform various data processing or computation.As at least part of the data processing or computation, the processor120 may load a command or data received from another component (e.g.,the sensor module 176 or the communication module 190) in volatilememory 132, process the command or the data stored in the volatilememory 132, and store resulting data in non-volatile memory 134. Theprocessor 120 may include a main processor 121 (e.g., a centralprocessing unit (CPU) or an application processor (AP)), and anauxiliary processor 123 (e.g., a graphics processing unit (GPU), animage signal processor (ISP), a sensor hub processor, or a communicationprocessor (CP)) that is operable independently from, or in conjunctionwith, the main processor 121. Additionally or alternatively, theauxiliary processor 123 may be adapted to consume less power than themain processor 121, or to be specific to a specified function. Theauxiliary processor 123 may be implemented as separate from, or as partof the main processor 121.

The auxiliary processor 123 may control at least some of functions orstates related to at least one component (e.g., the display device 160,the sensor module 176, or the communication module 190) among thecomponents of the electronic device 101, instead of the main processor121 while the main processor 121 is in an inactive (e.g., sleep) state,or together with the main processor 121 while the main processor 121 isin an active state (e.g., executing an application). The auxiliaryprocessor 123 (e.g., an image signal processor or a communicationprocessor) may be implemented as part of another component (e.g., thecamera module 180 or the communication module 190) functionally relatedto the auxiliary processor 123.

The memory 130 may store various data used by at least one component(e.g., the processor 120 or the sensor module 176) of the electronicdevice 101. The various data may include, for example, software (e.g.,the program 140) and input data or output data for a command relatedthereto. The memory 130 may include the volatile memory 132 or thenon-volatile memory 134.

The program 140 may be stored in the memory 130 as software, and mayinclude, for example, an operating system (OS) 142, middleware 144, oran application 146.

The input device 150 may receive a command or data to be used by anothercomponent (e.g., the processor 120) of the electronic device 101, fromthe outside (e.g., a user) of the electronic device 101. The inputdevice 150 may include, for example, a microphone, a mouse, a keyboard,or a digital pen (e.g., a stylus pen).

The sound output device 155 may output sound signals to the outside ofthe electronic device 101. The sound output device 155 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing a record, and thereceiver may be used for an incoming calls. The receiver may beimplemented as separate from, or as part of the speaker.

The display device 160 may visually provide information to the outside(e.g., a user) of the electronic device 101. The display device 160 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. The display device 160 may include touchcircuitry adapted to detect a touch, or sensor circuitry (e.g., apressure sensor) adapted to measure the intensity of force incurred bythe touch.

The audio module 170 may convert a sound into an electrical signal andvice versa. The audio module 170 may obtain the sound via the inputdevice 150, or output the sound via the sound output device 155 or aheadphone of an external electronic device (e.g., an electronic device102) directly (e.g., wiredly) or wirelessly coupled with the electronicdevice 101.

The sensor module 176 may detect an operational state (e.g., power ortemperature) of the electronic device 101 or an environmental state(e.g., a state of a user) external to the electronic device 101, andthen generate an electrical signal or data value corresponding to thedetected state. The sensor module 176 may include, for example, agesture sensor, a gyro sensor, an atmospheric pressure sensor, amagnetic sensor, an acceleration sensor, a grip sensor, a proximitysensor, a color sensor, an infrared (IR) sensor, a biometric sensor, atemperature sensor, a humidity sensor, or an illuminance sensor.

The interface 177 may support one or more specified protocols to be usedfor the electronic device 101 to be coupled with the external electronicdevice (e.g., the electronic device 102) directly (e.g., wiredly) orwirelessly. The interface 177 may include, for example, a highdefinition multimedia interface (HDMI), a universal serial bus (USB)interface, a secure digital (SD) card interface, or an audio interface.

A connecting terminal 178 may include a connector via which theelectronic device 101 may be physically connected with the externalelectronic device (e.g., the electronic device 102). The connectingterminal 178 may include, for example, an HDMI connector, a USBconnector, an SD card connector, or an audio connector (e.g., aheadphone connector).

The haptic module 179 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. The haptic module 179 may include, for example, a motor, apiezoelectric element, or an electric stimulator.

The camera module 180 may capture a still image or moving images. Thecamera module 180 may include one or more lenses, image sensors, imagesignal processors, or flashes.

The power management module 188 may manage power supplied to theelectronic device 101. The power management module 188 may beimplemented as at least part of, for example, a power managementintegrated circuit (PMIC).

The battery 189 may supply power to at least one component of theelectronic device 101. The battery 189 may include, for example, aprimary cell which is not rechargeable, a secondary cell which isrechargeable, or a fuel cell.

The communication module 190 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 101 and the external electronic device (e.g., theelectronic device 102, the electronic device 104, or the server 108) andperforming communication via the established communication channel. Thecommunication module 190 may include one or more communicationprocessors that are operable independently from the processor 120 (e.g.,the AP) and supports a direct (e.g., wired) communication or a wirelesscommunication. The communication module 190 may include a wirelesscommunication module 192 (e.g., a cellular communication module, ashort-range wireless communication module, or a global navigationsatellite system (GNSS) communication module) or a wired communicationmodule 194 (e.g., a local area network (LAN) communication module or apower line communication (PLC) module). A corresponding one of thesecommunication modules may communicate with the external electronicdevice via the first network 198 (e.g., a short-range communicationnetwork, such as Bluetooth™, wireless-fidelity (Wi-Fi) direct, orInfrared Data Association (IrDA)) or the second network 199 (e.g., along-range communication network, such as a cellular network, theInternet, or a computer network (e.g., LAN or wide area network (WAN)).These various types of communication modules may be implemented as asingle component (e.g., a single chip), or may be implemented as multicomponents (e.g., multi chips) separate from each other. The wirelesscommunication module 192 may identify and authenticate the electronicdevice 101 in a communication network, such as the first network 198 orthe second network 199, using subscriber information (e.g.,international mobile subscriber identity (IMSI)) stored in thesubscriber identification module 196.

The antenna module 197 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 101. The antenna module 197 may include an antennaincluding a radiating element composed of a conductive material or aconductive pattern formed in or on a substrate (e.g., PCB). The antennamodule 197 may include a plurality of antennas. In such a case, at leastone antenna appropriate for a communication scheme used in thecommunication network, such as the first network 198 or the secondnetwork 199, may be selected, for example, by the communication module190 (e.g., the wireless communication module 192) from the plurality ofantennas. The signal or the power may then be transmitted or receivedbetween the communication module 190 and the external electronic devicevia the selected at least one antenna. Another component (e.g., a radiofrequency integrated circuit (RFIC)) other than the radiating elementmay be additionally formed as part of the antenna module 197.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

Commands or data may be transmitted or received between the electronicdevice 101 and the external electronic device 104 via the server 108coupled with the second network 199. Each of the electronic devices 102and 104 may be a device of a same type as, or a different type, from theelectronic device 101. All or some of the operations to be executed atthe electronic device 101 may be executed at one or more of the externalelectronic devices 102, 104, or 108. For example, if the electronicdevice 101 should perform a function or a service automatically, or inresponse to a request from a user or another device, the electronicdevice 101, instead of, or in addition to, executing the function or theservice, may request the one or more external electronic devices toperform at least part of the function or the service. The one or moreexternal electronic devices receiving the request may perform the atleast part of the function or the service requested, or an additionalfunction or an additional service related to the request, and transferan outcome of the performing to the electronic device 101. Theelectronic device 101 may provide the outcome, with or without furtherprocessing of the outcome, as at least part of a reply to the request.To that end, a cloud computing, distributed computing, or client-servercomputing technology may be used, for example.

The electronic device 101 according to various embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smartphone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. The electronicdevices are not limited to those described above.

It should be appreciated that various embodiments of the presentdisclosure and the terms used therein are not intended to limit thetechnological features set forth herein to particular embodiments andinclude various changes, equivalents, or replacements for acorresponding embodiment. With regard to the description of thedrawings, similar reference numerals may be used to refer to similar orrelated elements. It is to be understood that a singular form of a nouncorresponding to an item may include one or more of the things, unlessthe relevant context clearly indicates otherwise.

As used herein, each of such phrases as “A or B,” “at least one of A andB,” “at least one of A or B,” “A, B, or C,” “at least one of A, B, andC,” and “at least one of A, B, or C,” may include any one of, or allpossible combinations of the items enumerated together in acorresponding one of the phrases. As used herein, such terms as “1st”and “2nd,” or “first” and “second” may be used to simply distinguish acorresponding component from another, and does not limit the componentsin other aspect (e.g., importance or order). It is to be understood thatif an element (e.g., a first element) is referred to, with or withoutthe term “operatively” or “communicatively”, as “coupled with,” “coupledto,” “connected with,” or “connected to” another element (e.g., a secondelement), it means that the element may be coupled with the otherelement directly (e.g., wiredly), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” or“circuitry”. A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to an embodiment, the module may be implemented in aform of an application-specific integrated circuit (ASIC).

Various embodiments as set forth herein may be implemented as software(e.g., the program 140) including one or more instructions that arestored in a storage medium (e.g., internal memory 136 or external memory138) that is readable by a machine (e.g., the electronic device 101).For example, a processor (e.g., the processor 120) of the machine (e.g.,the electronic device 101) may invoke at least one of the one or moreinstructions stored in the storage medium, and execute it, with orwithout using one or more other components under the control of theprocessor. This allows the machine to be operated to perform at leastone function according to the at least one instruction invoked. The oneor more instructions may include a code generated by a complier or acode executable by an interpreter. The machine-readable storage mediummay be provided in the form of a non-transitory storage medium. Wherein,the term “non-transitory” simply means that the storage medium is atangible device, and does not include a signal (e.g., an electromagneticwave), but this term does not differentiate between where data issemi-permanently stored in the storage medium and where the data istemporarily stored in the storage medium.

A method according to various embodiments of the disclosure may beincluded and provided in a computer program product. The computerprogram product may be traded as a product between a seller and a buyer.The computer program product may be distributed in the form of amachine-readable storage medium (e.g., compact disc read only memory(CD-ROM)), or be distributed (e.g., downloaded or uploaded) online viaan application store (e.g., PlayStore™), or between two user devices(e.g., smart phones) directly. If distributed online, at least part ofthe computer program product may be temporarily generated or at leasttemporarily stored in the machine-readable storage medium, such asmemory of the manufacturer's server, a server of the application store,or a relay server.

According to various embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. One or more of the above-described components maybe omitted, or one or more other components may be added. Alternativelyor additionally, a plurality of components (e.g., modules or programs)may be integrated into a single component. In such a case, theintegrated component may still perform one or more functions of each ofthe plurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. Operations performed by the module, the program, oranother component may be carried out sequentially, in parallel,repeatedly, or heuristically, or one or more of the operations may beexecuted in a different order or omitted, or one or more otheroperations may be added.

FIG. 2 illustrates a system configuration, according to an embodiment.

As illustrated in FIG. 2, a system (e.g., a contactless communicationsystem) includes an electronic device 210 (hereinafter, a firstelectronic device 210), a bridge device (an NFC bridge device) 220(hereinafter, a second electronic device 220), and at least one externaldevice 230. The second electronic device 220 (e.g., the bridge device)may be included in the external device 230 to operate as a contactlesscommunication module for contactless communication of the externaldevice 230. Contactless communication may include at least onecontactless proximity communication technique, such as NFC, RFIDcommunication, or MST communication. Hereinafter, for convenience ofdescription, NFC is illustrated as a representative example ofcontactless communication.

The second electronic device 220 may be included as an NFC module in theexternal device 230, or may operate as a separate device from theexternal device 230 and may be connected with the external device 230via a configured communication interface. A system environment isillustrated in which the second electronic device 220 is providedseparately from the external device 230 and is connected to the externaldevice 230. The second electronic device 220 may refer to an NFC moduleand any device of the external device 230.

The first electronic device 210 may include a display 219, a housing (ormain body) 217 which the display 219 is mounted on and is fastened to,and an additional device disposed in the housing 217 to perform afunction of the first electronic device 210. The additional device mayinclude a first speaker 201, a second speaker 203, a microphone 205, asensor (e.g., a front camera 207 or an illumination sensor 209), acommunication interface (e.g., a charging or data input/output port 211or an audio input/output port 213), or a button 215.

The first electronic device 210 may widely refer to a device capable ofcommunication using short-range wireless communication. The firstelectronic device 210 may include various portable devices, such as acellular phone, a smartphone, a tablet personal computer (PC), or an NFCraider.

The first electronic device 210 may be connected with the secondelectronic device 220. The first electronic device 210 may include ashort-range communication module (e.g., the wireless communicationmodule 192) capable of supporting NFC. The first electronic device 210may communicate with the external device 230 connected to the secondelectronic device 220 through the second electronic device 220. When theexternal device 230 is a device including the second electronic device220 (e.g., an NFC module), the first electronic device 210 may directlycommunicate with the external device 230 using the communication circuitfor NFC.

The first electronic device 210 and the second electronic device 220 maydetermine proximity to any one electronic device or perform tagging(e.g., NFC tagging) of any one electronic device as a trigger toinitiate contactless communication (e.g., NFC) with the counterpartelectronic device. The first electronic device 210 may operate as an NFCinitiator (or originating device) or an NFC target (or receivingdevice). An NFC initiator may be abbreviated as an initiator, and an NFCtarget may be abbreviated as a target. Hereinafter, the first electronicdevice 210 is illustrated as operating as an initiator.

The second electronic device 220 may include a device performing NFCwith the first electronic device 210. The second electronic device 220may perform NFC with the first electronic device 210. The secondelectronic device 220 may be configured to communicate with (e.g., tag)the first electronic device 210, being in contact therewith. Forexample, the first electronic device 210 and the second electronicdevice 220 may perform NFC in a contact state or in a contactless state.

The second electronic device 220 may serve as a relay such that thefirst electronic device 210 may communicate with or may control theexternal device 230 (or a host device) through NFC. The secondelectronic device 220 may have a similar configuration to that of thefirst electronic device 210 illustrated above. The second electronicdevice 220 may operate as an initiator (i.e., an originating device) ora target (i.e., a receiving device) in NFC. Hereinafter, the secondelectronic device 220 is illustrated as operating as a target.

The external device 230 (or host device) may include various devicescapable of being connected with the first electronic device 210 via thesecond electronic device 220. For example, the external device 230 mayinclude a desktop PC 231 (hereinafter, a computer), a tablet PC 232, ora laptop PC 233 (e.g., a notebook). The external device 230 may widelyrefer to a device capable of communicating with or being controlled bythe first electronic device 210 via the second electronic device 220. Acomputer is illustrated as an example of the external device 230.

The external device 230 may support one or more specified protocols usedfor connecting to the second electronic device 220 via a direct (orwired) interface (e.g., a serial or USB interface) or a wirelessinterface (e.g., non-NFC, for example, Bluetooth™, Wi-Fi, or lightfidelity (Li-Fi) communication).

A variety of examples associated with an operation in which the firstelectronic device 210 and the second external device 220 interwork toestablish a connection for communication and accordingly performcontinuous communication will be described.

NFC technology may be used similarly to a UART communication modeentailing a cable connection (e.g., enabling massive data transmissionand reception and continuous data communication). Provided is a methodfor resolving disadvantages of discontinuous (e.g. one-off)communication, which is a typical restriction on existing NFCcommunication technology; minimizing unnecessary delays in implementingcontinuous communication (e.g., loop communication); maximizing theamount (e.g., size or number of files) of data that can be transmittedat a time; and processing an error that occurs while performingcommunication.

FIG. 3 schematically illustrates a continuous communication operationbetween electronic devices, according to an embodiment.

FIG. 3 illustrates an example in which a first electronic device 210operates as an initiator and a second electronic device 220 operates asa target.

The initiator 210 may refer to an NFC device that initiates and controlsNFC. The initiator may initially output electromagnetic waves, therebyinitiating NFC. In this case, the wavelength of a used frequency may be,for example, about 13.56 MHz, but is not limited thereto, and variouspossible frequency wavelengths may be used. The initiator may activelygenerate electromagnetic waves (or radio frequency (RF) fields) tosupply power to the target 220. Accordingly, the initiator enables thetarget to have a simple form factor, for example, an unpowered tag, asticker, or a card.

The initiator may perform transmission rate selection, an initializationprocess, and/or a single device detection (SDD) process. Further, beforegenerating an RF field, the initiator may further perform a collisionavoidance procedure by detecting an external RF field.

The target 220 may refer to an NFC device that performs NFC with theinitiator under the control of the initiator 210. The target may be apassive NFC target that is provided with an operating voltage from an RFfield (or RF signal) generated in the initiator or may be an active NFCtarget that is capable of actively generating an RF field.

NFC between the initiator 210 and the target 220 may be performed in amanner such that the initiator transmits an RF signal including acommand (e.g., a read command or write command) to the target and thetarget transmits an RF response signal including a response to thecommand to the initiator.

In NFC between electronic devices, repeated data communication may beenabled on the basis of continuous communication (e.g., loopcommunication). For example, after a protocol is set up (or configured)between the first electronic device 210 and the second electronic device220, data transmission and reception between the two electronic devices210 and 220 may be enabled.

As illustrated in FIG. 3, a method of the present disclosure may includean initialization operation (operation (A)), a protocol setup operation(operation (B)), a parameter setup operation (operation (C)), and a datatransfer operation (operation (D).

Referring to FIG. 3, in operation (A), the first electronic device 210and the second electronic device 220 initiate NFC. When the firstelectronic device 210 turns on an NFC function and the first electronicdevice 210 and the second electronic device 220 move to be within aspecified range of one another, the first electronic device 210 and thesecond electronic device 220 may initiate NFC. The first electronicdevice 210 may recognize that the second electronic device 220 is withinthe specified range. In NFC, the operating mode (or NFC mode) of thefirst electronic device 210 and the second electronic device 220 mayinclude a card emulation mode, a reader/writer mode, and a peer-to-peer(P2P) mode. The first electronic device 210 and the second electronicdevice 220 may operate in an initiator mode (operating as an initiator)or in a target mode (operating as a target). FIG. 3 illustrates anexample in which the first electronic device 210 operates as aninitiator and the second electronic device 220 operates as a target.

In the initialization operation, the first electronic device 210 maygenerate an RF signal to initiate NFC to thereby supply an operatingvoltage to the second electronic device 220, and the second electronicdevice 220 may provide an RF response signal to the first electronicdevice 210 in response to the received RF signal. In the initializationoperation, the first electronic device 210 may request identificationinformation (e.g., check a card or an ID as device identificationinformation) about the second electronic device 220, and the secondelectronic device 220 may provide relevant identification information tothe first electronic device 210 in response to the request from thefirst electronic device 210.

In operation (B), the first electronic device 210 and the secondelectronic device 220 perform a protocol setup operation. In theprotocol setup operation, the first electronic device 210 and the secondelectronic device 220 may perform a negotiation operation associatedwith establishing (or forming) a communication channel (or acommunication session) for NFC between the two electronic devices 210and 220.

In operation (C), the first electronic device 210 and the secondelectronic device 220 perform a parameter setup operation. The firstelectronic device 210 and the second electronic device 220 may include,as a subsequent process, a negotiation operation for data communicationbased on continuous communication (e.g., loop communication). Forexample, the first electronic device 210 and the second electronicdevice 220 may include an operation associated with setting up variouspieces of relevant information for continuous communication. The firstelectronic device 210 and the second electronic device 220 may includean operation of setting up at least one parameter used for continuouscommunication between the first electronic device 210 and the secondelectronic device 220 in the parameter setup operation. The parametermay include, for example, an operation of configuring applicationinformation (e.g., application ID (AID)), a command, or a data packet(e.g., a packet length or a packet segmentation). In the parameter setupoperation, the first electronic device 210 and the second electronicdevice 220 may exchange information about the maximum length of a datapacket transmitted in a subsequent process.

In operation (D), the first electronic device 210 and the secondelectronic device 220 perform data communication. The first electronicdevice 210 and the second electronic device 220 may perform datacommunication on the basis of discontinuous (or one-off) communicationor continuous communication (e.g., loop communication) according to acommunication type (e.g., long-packet data transmission or short-packetdata transmission). Continuous communication may be a mode that enablesthe first electronic device 210 (e.g., the initiator) and the secondelectronic device 220 (e.g., the target) to perform continuous datatransmission and reception without repeatedly performing theinitialization operation after the protocol setup operation between thetwo devices 210 and 220. Accordingly, NFC may enable continuous datacommunication similar to cable communication in a cable connectionenvironment. An operation of transmitting and receiving data on thebasis of continuous communication will be described in detail below.

FIG. 4 illustrates a function processing module of an electronic device,according to an embodiment.

FIG. 4 illustrates a function processing module 400 that implements afunction associated with an NFC-enabled electronic device for providingcontinuous data communication. FIG. 4 further illustrates a functionalprocessing module 410 that enables electronic devices having an NFCfunction to perform repeated data transmission and reception withoutphysical movements in order to use NFC along with communication (e.g.,UART communication) entailing a cable connection. The functionprocessing module 400 may be included as a hardware module in aprocessor 120 including processing circuitry in any of the electronicdevices, or may be included as a software module.

In FIG. 4, reference numeral 410 may illustrate a configuration of afirst electronic device 210 corresponding to the electronic device 101operating as an initiator, and reference numeral 430 may illustrate aconfiguration of a second electronic device 220 corresponding to theelectronic device 101 operating as a target.

FIG. 4 is a block diagram in which separately illustrated blocks may belogically distinguished elements of the electronic device 101. Forexample, the elements of the electronic device 101 may be configured asa single chip or as a plurality of chips depending on the design of theelectronic device 101, or only relevant elements may be included andconfigured as a single chip or as a plurality of chips depending on therole of the electronic device 101 (e.g., an initiator or a target).

At least one of modules, data, programs, or software that implement theoperation of the electronic device 101 illustrated in FIG. 4 may bestored in the memory 130 and may be executed by the processor 120.

Referring to FIG. 4, the function processing module 400 includes a firstelement 410 for an initiator mode and a second element 430 for a targetmode. The function processing module 400 may be configured to includeonly one of the elements depending on the role of the electronic device101 (e.g., an initiator or a target).

The first element 410 for the initiator mode may include a connectionmodule 411, a device (or a card) detection module 412, an applicationselection module 413, a first packet setup module 414, a test module415, a first command manager 416, or a device release module 417.

The second element 430 for the target mode may include a service startmodule 431, a device (or a card) response module 432, an applicationresponse module 433, a second packet setup module 434, or a secondcommand manager 435.

Although FIG. 4 shows that at least some components (e.g., the first andsecond packet setup modules 414 and 434, the first and second commandmanagers 416 and 435, the connection module 411, the service startmodule 431, the application selection module 413, and the applicationresponse module 433) of the first element 410 and the second element 420are divided into the first element 410 and the second element 420, thesecomponents may be for common use and may perform different functionsaccording to the role of the electronic device 101.

An example in which the electronic device 101 operates as an initiatorwill be described with reference to the first element 410.

The connection module 411 may control NFC and may initially outputelectromagnetic waves to initiate NFC. The connection module 411 maygenerate an RF signal to initiate NFC and may supply an operatingvoltage to a second electronic device 220 operating as a target bytransmitting the RF signal through an antenna (e.g., the antenna module197 or a loop antenna). The RF signal may include a request command(e.g., a first command) to initiate NFC.

The device detection module 412 may perform device detection (or asearch) when NFC is initiated. For example, the device detection module412 may perform an NFC device (or service) discovery procedure for NFC.The device detection module 412 may determine whether the secondelectronic device 220 is detected on the basis of an RF response signalin response to the RF signal. A packet structure associated with acriterion for the first electronic device 210 to determine the presenceof the second electronic device 220 may be defined as illustrated inTable 1.

TABLE 1 Field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Description 0 d e t e ct Brate CID NAD Description STX len cmd data ETX

As illustrated in Table 1, field 0 may be a field relating the start ofdata transmission (start TX (STX)) of continuous communication; field 1and field 2 may be fields relating to the length (len) of data (or apacket); field 3 to field 9 may be fields relating to a command (cmd);field 10 to field 13 may be fields relating to data; and field 14 may bea field relating to the end of data transmission (end TX (ETX)) ofcontinuous communication. Information about device detection may beincluded on the basis of at least some (e.g., field 4 to field 9) of thecommand fields.

The application selection module 413 may configure applicationinformation (AID) of an application for continuous communication (e.g.,repeated data transmission and reception) with an application on thesecond electronic device 220. The application selection module 413 mayrequest application information about an application automatically fedback by the second electronic device 220 in response to reception ofdata. The application selection module 413 may configure applicationinformation on the basis of the application information received fromthe second electronic device 220. An example of configuring applicationinformation (AID) is illustrated in Table 2.

TABLE 2 Field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Description T len1 T len2CLS INS P1 P2 C len Application ID Description STX len APDU header APDUData ETX

As illustrated in Table 2, field 0 may be a field relating the start ofdata transmission (STX) of continuous communication; field 1 and field 2may be fields relating to the length (len) of data (or a packet); field3 to field 7 may be fields relating to a data header (e.g., anapplication protocol data unit (APDU) header); field 8 to field 12 maybe fields relating data (e.g., APDU data); and field 14 may be a fieldrelating to the end of data transmission (ETX) of continuouscommunication. Information about application information (AID) may beincluded on the basis of at least some (e.g., field 8 to field 12) ofthe data fields. By configuring application information (AID) forcommunication with a particular application of a target device,communication may be enabled only by an application corresponding to theconfigured application information, thereby resolving a security issue.

A first packet setup module 414 may set up a packet structure for data.The first packet setup module 414 may set up the packet length of dataused in data communication with the second electronic device 220. Thefirst packet setup module 414 may set up a packet length of a shortpacket structure for data communication by discontinuous communication(hereinafter, discontinuous data communication), an example of which isillustrated in Table 3. The first packet setup module 414 may set up apacket length of a long packet structure for data communication bycontinuous communication (hereinafter, continuous data communication),an example of which is illustrated in Table 4.

TABLE 3 Field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Description T len1 T len2CLS INS P1 P2 C len cnt Command Data Description STX len APDU headerAPDU Data ETX

TABLE 4 Field 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Description T len Tlen CLS INS P1 P2 EXT C len C len cnt Command Data Description STX lenAPDU header APDU Data ETX

Table 3 shows an illustrative structure of a packet (e.g., a shortpacket of 255 bytes or less) for a short command, and Table 4 shows anillustrative structure of a packet (e.g., a long packet of 256 bytes orgreater) for a short command and a long command. The buffer size of datathat can be transmitted at a time may be expanded (e.g., maximized) onthe basis of the structure of the packet for the short command and thelong command illustrated in Table 4. For example, an extended (e.g.,EXT) application protocol data unit (APDU) may be used to overcomerestrictions on data in NFC. An APDU may be a unit of data exchangedbetween equivalent application entities in an application layer and mayinclude application protocol control information and application layeruser data.

As illustrated in Table 4, a count (cnt, e.g., a command count) may beset up for a command (cmd), thereby maximizing a data size. It ispossible to set up a command count for both a transmission (Tx) packetand a reception (Rx) packet and to transmit or receive data until thecommand count is 0, thereby processing the data as one packet (or data).For example, the first electronic device 210 may continuously transmitsub-packets (e.g. a first sub-packet and a second sub-packet) of onepacket to the second electronic device 220 until the value of a commandcount (or packet count) for processing a long packet is 0, and thesecond electronic device 220 may continuously receive the sub-packets(e.g., the first sub-packet and the second sub-packet) until the valueof a command count is 0, and may process the sub-packets as one packet.

The test module 415 may execute a repeated test (e.g., run test) forcontinuous data communication. The test module 415 may set up a protocolto a wrapper structure for continuous data communication when theelectronic device 101 operates as an initiator. For example, referringto Table 3, the test module 415 may set up a wrapper for the repeatedtest using fields (e.g., field 0 to field 8 and field 13) other thanfields relating to command data (e.g., field 9 to field 12) in the shortpacket structure. The test module 415 may perform the repeated test forcontinuous data communication on the basis of the configured applicationinformation (AID) and the packet length and may verify whether an errorfailure occurs on the basis of the test result.

A first command manager 416 may perform continuous command processing,rather than one-off command processing, for continuous datacommunication (e.g., repeated data transmission and reception). Whencontinuous data communication is determined, the first command manager416 may continuously process a relevant command in response to thechange (e.g., a decrease) of a set-up command count according to thedata size of one long packet. For example, the first command manager 416may divide one long packet into sub-packets according to the data size(or file unit) set for one long packet and may repeatedly transmit acommand when transmitting the divided sub-packets. The first commandmanager 416 may transmit a first sub-packet and a first commandassociated therewith, and may transmit a second sub-packet followingtransmitting the first sub-packet, and a second command associatedtherewith when the first sub-packet is completely transmitted (e.g.,when the command count is decreased by one). The first command manager416 may continuously transmit the individual sub-packets until thecommand count is 0, thus processing the sub-packets as one packet (oritem of data).

The device release module 417 may perform disconnection (or separation)from the second electronic device 220 when an error (e.g., an error dueto non-response from the second electronic device 220) occurs incontinuous data communication with the second electronic device 220. Thedevice release module 417 may perform temporary disconnection (orseparation) from the second electronic device 220 and may establish aconnection with the second electronic device 220 again via theconnection module 411. The device release module 417 may perform on-off(e.g., RF field On/Off) control of electromagnetic waves (or RF field)that enables the first electronic device 210 to supply power to thesecond electronic device 220. Accordingly, an RF field on/off functionmay be defined, examples of which are illustrated in Table 5 and Table6.

TABLE 5 Field 0 1 2 3 4 5 6 7 8 9 10 Description — — — 0 f i 1 d o n —Description STX len cmd ETX

TABLE 6 Field 0 1 2 3 4 5 6 7 8 9 10 Description — — — 0 f i l d o f —Description STX len cmd ETX

As illustrated in Table 5 and Table 6, field 0 may be a field relatingthe start (STX) of continuous communication; field 1 and field 2 may befields relating to the length (len) of a packet; field 3 to field 9 maybe fields relating to a command (cmd); and field 10 may be a fieldrelating to the end of data transmission (ETX) of continuouscommunication. On/off information about an RF field (e.g., f, i, d, o,and n in Table 5 indicating that a field is on and f, i, l, d, o, and fin Table 6 indicating that a field is off) may be included on the basisof at least some of the command fields (e.g., field 4 to field 9). Inthe case for when a field is on, “fildon” indicating a field-on statemay be set up using field 4 to field 9, and in the case for when a fieldis off, “fildof” indicating a field-off state may be set up using field4 to field 9. The on/off information about the RF field (e.g., a fieldvalue) may be expressed as various values (e.g., a numerical value or anAmerican Standard Code Information Interchange (ASCII) code) capable ofindicating RF field on/off.

An example in which the electronic device 101 operates as a target willbe described with reference to the second element 430.

The service start module 431 may determine whether to start a service(e.g., to initiate NFC) in response to an RF signal received from anelectronic device operating as an initiator (hereinafter, the firstelectronic device 210) and may generate and transmit an RF responsesignal for starting the service to the first electronic device 210. Uponinitiating NFC, the service start module 431 may set the operating modeof the electronic device 101 to a card emulation mode.

The device response module 432 may transmit a response signal to thefirst electronic device 210 in response to a device detection (or asearch) request from the first electronic device 210 upon initiatingNFC. Although the device detection module 412 and the device responsemodule 432 are illustrated as being logically separated from each other,the device detection module 412 and the device response module 432 maybe configured as a single module.

The application response module 433 may transmit application information(AID) about the second electronic device 220 to the first electronicdevice 210 in response to an application information (AID) request fromthe first electronic device 210. Although the application selectionmodule 413 and the application response module 433 are illustrated asbeing logically separated from each other, the application selectionmodule 413 and the application response module 433 may be configured asa single module.

A second packet setup module 434 may set up a packet structure for data.The second packet setup module 434 may set up the packet length of dataused in data communication with the first electronic device 210. Thesecond packet setup module 434 may set up a short packet or a longpacket for the data used in the data communication on the basis ofinformation about a packet structure, as illustrated in Table 3 or Table4, received from the first electronic device 210. Although the firstpacket setup module 414 and the second packet setup module 434 areillustrated as being logically separated from each other, the firstpacket setup module 414 and the second packet setup module 434 may beconfigured as a single module.

A second command manager 435 may perform continuous command processing,rather than one-off command processing, for continuous datacommunication (e.g., repeated data transmission and reception). Whencontinuous data communication is detected, the second command manager435 may continuously receive a relevant command in response to a change(e.g., a decrease) of a set-up command count according to the data sizeof one long packet. For example, the second command manager 435 mayrepeatedly receive a sub-packet divided according to the data size (orfile unit) set for one long packet and a command associated therewith.The second command manager 435 may receive a first command and mayprocess a first sub-packet associated therewith. Then, when the firstsub-packet is completely received (e.g., when the command count isdecremented by one), the second command manager 435 may receive a secondcommand, which follows the first command, and may process a secondsub-packet associated therewith. The second command manager 435 maycontinuously receive individual sub-packets until the command count is0, thus processing the sub-packets as one packet (or data). The secondcommand manager 435 may transmit a command to software (e.g., firmware)in the electronic device 101 (e.g., the target device), may receive aresponse to the command from the software in the electronic device 101,and may process data on the basis of the received response. For example,for continuous data communication (e.g., repeated data transmission andreception), the second command manager 435 may transmit successivecommands for data processing of a long packet to the software in theelectronic device 101, and may continuously process data received fromthe initiator upon continuously receiving a response to the successivecommands from the software.

The illustrative configuration of the elements 410 and 430 describedwith reference to FIG. 4 enables repeated data transmission andreception between an initiator (e.g., the first electronic device 210)and a target (e.g., the second electronic device 220) after a protocolsetup operation between the initiator and the target. For example, inNFC between the initiator and the target, it is possible to enablecontinuous communication (e.g., loop communication) in a manner similarto the communication characteristics found in cable connection basedcommunication.

The function processing module 400 may further include an additionalcomponent in addition to the above-described components, such as aninterface (or an interface module) for interfacing a signal exchangedbetween an electronic device (e.g., the first electronic device 210 orthe second electronic device 220) and the external device 230.

The function processing module 400 may include logic for defining aprotocol for NFC communication. For example, the logic may define a cardemulation mode and a P2P mode according to NFC interface protocol (IP)standards. The P2P mode may include an initiator mode and a target mode.The function processing module 400 may include a buffer memory forbuffering data exchanged between the electronic device 101 and theexternal device 230 or between the initiator and the target. The buffermemory may buffer data in a first-in first-out (FIFO) manner.

According to an embodiment, an electronic device includes acommunication interface configured for contactless communication (e.g.,NFC, RFID communication, or MST communication) with a differentelectronic device; and a processor, configured to detect a trigger toinitiate contactless communication with the different electronic device,determine a communication type associated with communication to beperformed with the different electronic device upon detecting thetrigger, set at least one parameter associated with continuouscommunication when the communication type is the continuouscommunication, and perform the continuous communication with thedifferent electronic device on the basis of the set parameter.

The processor may determine an operating mode of the electronic deviceupon detecting the trigger.

The processor may set a mode for the continuous communication when theelectronic device is determined to operate as an initiator.

The processor may configure data for the continuous communication whenthe electronic device is determined to operate as the initiator.

The processor may divide additional data associated with the data intoat least one sub-packet on the basis of a set data size.

The processor may configure a command for each sub-packet associatedwith the data, receive a first response to a first command associatedwith a first sub-packet from the different electronic device, andcontinuously transmit a second sub-packet, which follows the firstsub-packet, and a second command associated with the second sub-packetto the different electronic device upon receiving the first response.

The processor may determine at least one set state upon transmitting thefirst command, and perform data recovery associated with the firstsub-packet when detecting an error on the basis of the determined state.

The processor may set a command count corresponding to the firstsub-packet or the second sub packet, and continuously transmit at leastone or more of the first or the second sub-packets up to a finalsub-packet on the basis of the command count.

The processor may set a card emulation mode when the electronic deviceis determined to operate as a target.

The processor may receive a plurality of sub-packets on the basis of thecontinuous communication with the different electronic device aftersetting the card emulation mode, and process the received plurality ofsub-packets as one piece of data when detecting a final sub-packet onthe basis of the command count.

The contactless communication may include at least one of NFC, RFIDcommunication, or MST communication.

FIG. 5 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

Referring to FIG. 5, in step 501, a processor 120 (e.g., at least oneprocessor including processing circuitry) of an electronic device (e.g.,the first electronic device 210, the second electronic device 220, orthe function processing module 400) detects a trigger. The trigger mayindicate that the first electronic device 210 operating as an initiatorin NFC or the second electronic device 220 operating as a target in NFCinitiates NFC with a counterpart electronic device. The processor 120may generate an RF field, and may detect the trigger when receiving anRF response signal corresponding to the RF field. The processor 120 maydetect the trigger when detecting an RF field generated by thecounterpart electronic device.

In step 503, the processor 120 determines the operating mode (or NFCmode) of the electronic device 101. The operational mode may include aninitiator mode in which the electronic device 101 operates as aninitiator or a target mode in which the electronic device 101 operatesas a target.

In step 505, the processor 120 determines whether the electronic device101 operates as an initiator or a target on the basis of the result ofthe determination in step 503. When the electronic device 101 outputs anelectromagnetic wave (e.g., an RF field) to initiate NFC, the processor120 may determine that the electronic device 101 operates as aninitiator. When the electronic device 101 is a device that is suppliedwith an operating voltage from an RF field generated by an initiator andtransmits an RF response signal accordingly, the processor 120 maydetermine that the electronic device 101 operates as a target.

When it is determined that the electronic device 101 operates as aninitiator in step 505 (e.g., yes in step 505), the processor 120configures a mode for continuous communication in step 507. Theprocessor 120 may define a packet structure for data for continuouscommunication. The processor 120 may define a long packet and the datasize thereof in the packet structure, may divide the long packet into atleast one sub-packet according to the data size (or per file), and mayconfigure a command for each divided sub-packet.

In step 509, the processor 120 transmits the data to a target on thebasis of continuous communication. The processor 120 may sequentiallytransmit sub-packets, into which one long packet is divided, andcommands associated therewith to the target in a continuouscommunication mode. The processor 120 may check a command count and maycontinuously perform data communication (i.e., continuously transmitdata) until the command count is 0.

When it is determined that the electronic device 101 operates as atarget in step 505 (e.g., no in step 505), the processor 120 sets theoperating mode of the electronic device 101 to the card emulation modein step 511. Upon determining that the electronic device 101 operates asa target, the processor 120 may set the operating mode of the electronicdevice 101 for NFC to the card emulation mode so that the electronicdevice 101 may immediately communicate with the initiator.

In step 513, the processor 120 receives data from the initiator on thebasis of continuous communication. The processor 120 may sequentiallyreceive sub-packets into which one long packet is divided. The processor120 may check a command count for the packet, may continuously receivethe sub-packets until the command count is 0, and may process thereceived sub-packets into one packet upon receiving the finalsub-packet.

An operating method for supporting continuous communication in NFCbetween electronic devices will be described below.

FIG. 6 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

FIG. 6 illustrates an example in which an electronic device 101 operatesas an initiator (e.g., the first electronic device 210).

Referring to FIG. 6, in step 601, a processor 120 (e.g., at least oneprocessor including processing circuitry) of the electronic device (orthe function processing module 400) detects a trigger that initiatesNFC.

In step 603, the processor 120 performs a protocol setup operation whenNFC is initiated. The processor 120 may set up protocols necessary forNFC with a target, may process a negotiation operation for establishing(or setting up) a communication channel for NFC with the target, and/ormay define a logical interface (e.g., an NFC controller interface (NCI))used to implement NFC between the initiator and the target and mayperform the protocol setup operation on the basis of an NFC-dataexchange protocol (NFC-DEP). The processor 120 may obtain applicationinformation about the target during protocol setup.

In step 605, the processor 120 determines a communication type. Theprocessor 120 may determine whether a communication type is a first type(e.g., continuous communication) or a second type (e.g., one-offcommunication) at least on the basis of the size of pieces of data to betransmitted, the number of data, or the application information aboutthe target.

In step 607, the processor 120 configures data on the basis thedetermined communication type. When it is determined that thecommunication type is the first type, the processor 120 may define along packet structure for a long command. When it is determined that thecommunication type is the second type, the processor 120 may define ashort packet structure for a short command. Examples of packetstructures are illustrated above in Table 3 and Table 4. For example,the processor 120 may set (or limit) the length (e.g., the maximumlength) of a data packet and may divide a data packet into a pluralityof sub-packets according to the data size and the length of the packet.FIG. 6 illustrates an example in which continuous communication on along packet is performed instead of one-off communication based on ashort packet.

In step 609, the processor 120 performs data communication in acontinuous communication mode. The processor 120 may transmit a firstsub-packet and a first command associated therewith, and may transmit asecond sub-packet, which follows the first sub-packet, and a secondcommand associated therewith when (e.g., after) the first sub-packet iscompletely transmitted (e.g., when a command count is decreased by one).The processor 120 may continuously transmit the individual sub-packetsuntil the command count is 0, thus processing the sub-packets as onepacket (or item of data). The processor 120 may transmit the firstcommand for the first sub-packet to the target, and may successivelytransmit the second sub-packet and the second command associatedtherewith upon receiving a first response transmitted (or forwarded) bythe target in response to the first command (or with respect to thefirst command).

FIG. 7 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

FIG. 7 illustrates an example in which an electronic device 101 operatesas an initiator (e.g., the first electronic device 210).

Referring to FIG. 7, in step 701, a processor 120 (e.g., at least oneprocessor including processing circuitry) of the electronic device (orthe function processing module 400) detects a trigger that initiatesNFC.

In step 703, the processor 120 performs a protocol setup operation whenNFC is initiated. The processor 120 may process a negotiation operationfor establishing (or setting up) a communication channel (orcommunication session) for NFC between the initiator and a target.

In step 705 and step 707, the processor 120 determines a communicationtype. The processor 120 may determine at least one piece ofcommunication information, such as the size of data to be transmitted,the number of pieces of data, or application information about thetarget, and may determine whether a communication type is a first type(e.g., continuous communication) or a second type (e.g., one-offcommunication) at least on the basis of the determined communicationinformation.

When it is determined that the communication type is the first type ofcontinuous communication in step 707 (e.g., yes in step 707), theprocessor 120 configures data in a long packet structure in step 709.The processor 120 may define a long packet structure for a long commandas illustrated in Table 4. For example, the processor 120 may set (orlimit) the length (e.g., the maximum length) of a data packet, maydivide a data packet into a plurality of sub-packets according to thedata size and the length of the packet, and may configure commands forthe respective sub-packets.

In step 711, the processor 120 performs data communication in acontinuous communication mode. The processor 120 may transmit a firstsub-packet and a first command associated therewith, and may transmit asecond sub-packet, which follows the first sub-packet, and a secondcommand associated therewith when (e.g., after) the first sub-packet iscompletely transmitted (e.g., when a command count is decreased by one).The processor 120 may transmit the first command for the firstsub-packet to the target, and may successively transmit the secondsub-packet and the second command associated therewith upon receiving afirst response transmitted by the target in response to the firstcommand (or with respect to the first command).

In step 713, the processor 120 determines whether the data to betransmitted is final data (e.g., sub-packet) while performing continuouscommunication. The processor 120 may detect data for which the commandcount is 0 as final data.

When no final data is detected in step 713 (e.g., no in step 713), theprocessor 120 performs step 711 and a step 713. The processor 120 maycontinuously transmit the sub-packets until the command count is 0 (oruntil final data is detected), thus processing the sub-packets as onepacket (or data).

When final data is detected in step 713 (e.g., yes in step 713), theprocessor 120 terminates the data transmission operation. The processor120 may maintain the connection of a communication channel (orcommunication session) with the target even when terminating datatransmission. The processor 120 may also perform disconnection from thetarget at the time of completing the data transmission according topreset information about the continuous communication.

When it is determined that the communication type is the second type ofdiscontinuous communication (or one-off communication) in step 707(e.g., no in step 707), the processor 120 configures data in a shortpacket structure in step 715. The processor 120 may define a shortpacket structure for a short command (e.g., one-off communication) asillustrated in Table 3.

In step 717, the processor 120 performs data communication in adiscontinuous communication mode. The processor 120 may transmit a datapacket and a command associated therewith and may immediately terminatethe data transmission operation. The processor 120 may maintain theconnection of the communication channel (or communication session) withthe target even when terminating data transmission. The processor 120may also perform disconnection from the target at the time of completingthe data transmission according to preset information about thediscontinuous communication.

FIG. 8 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

FIG. 8 illustrates an example of an operation of processing an errorthat may occur during continuous communication between an initiator anda target when an electronic device operates as an initiator (e.g., thefirst electronic device 210).

Referring to FIG. 8, in step 801, a processor 120 (e.g., at least oneprocessor including processing circuitry) of the electronic device (orthe function processing module 400) transmits a first command to atarget. The processor 120 may transmit the first command for a firstsub-packet to the target in a continuous communication mode.

When the first command is transmitted, the processor 120 determines (ormonitors) at least one set state in step 803. The processor 120 maymonitor a state for error (failure) detection (e.g., a first state, asecond state, and a third state) in connection with continuouscommunication with the target. The state for error detection may be, forexample, a no-tag (e.g., no-service) state (e.g., a first state), alockup state (e.g., a second state), or a disconnected state (e.g., athird state) of the target.

In step 805, the processor 120 determines whether an error is detectedon the basis of the determined state. When at least one set state, suchas the first state, the second state, or the third state, is detected onthe basis of the monitoring result, the processor 120 may determine thatan error has occurred.

When no error is detected in step 805 (e.g., no in step 805), theprocessor 120 transmits a second command to the target in step 807. Theprocessor 120 may transmit the second command for a second sub-packet tothe target in the continuous communication mode.

When an error is detected in step 805 (e.g., yes in step 805), theprocessor 120 performs a device connection operation in step 809. Whenan error occurs in the continuous communication mode, the processor 120may perform temporary disconnection (or separation) from the target andmay attempt to reconnect to the target. The processor 120 may performon-off (e.g., RF field on/off) control of electromagnetic waves (or RFfield) that enables the initiator to supply power to the target.Examples of defining an RF field on/off function are illustrated inTable 5 and Table 6.

In step 811, the processor 120 selects an application. The processor 120may reset application information (AID) about an application forcontinuous communication with an application on the target. Theprocessor 120 may request application information about an applicationautomatically fed back by the target in response to reception of data.The processor 120 may configure application information on the basis ofthe application information received from the target. An example ofconfiguring application information (AID) is illustrated in Table 2.

After performing step 809 and step 811, the processor 120 proceeds tostep 803 and performs step 803 and subsequent operations. For example,the processor 120 may determine a state in step 803, and may transmitthe second command in step 807 when no error is detected, therebycontinuing data transmission by resolving an error.

FIG. 9 is a flowchart illustrating an operating method of an electronicdevice, according to an embodiment.

FIG. 9 illustrates an example in which an electronic device 101 operatesas an initiator (e.g., the first electronic device 210). FIG. 9illustrates an example of an operation of processing an error that mayoccur during continuous communication between an initiator and a targetand automatically recovering data upon the occurrence of an error. Anoperation of processing an error may correspond to that described withreference to FIG. 8, and FIG. 9 may further include an operation ofrecovering data.

Referring to FIG. 9, in step 901, a processor 120 (e.g., at least oneprocessor including processing circuitry) of the electronic device (orthe function processing module 400) transmits a first command to atarget. The processor 120 may transmit the first command for a firstsub-packet to the target in a continuous communication mode.

When the first command is transmitted, the processor 120 determines (ormonitors) at least one set state in step 803. The processor 120 maymonitor a state for error (failure) detection (e.g., a first state, asecond state, and a third state). The state for error detection may be,for example, a no-tag state, a lockup state, or a disconnected state ofthe target.

In step 905, the processor 120 determines whether an error is detectedon the basis of the determined state. When at least one set state, suchas the first state, the second state, or the third state, is detected onthe basis of the monitoring result, the processor 120 may determine thatan error has occurred.

When no error is detected in step 905 (e.g., no in step 905), theprocessor 120 transmits a second command to the target in step 907. Theprocessor 120 may transmit the second command for a second sub-packet tothe target in the continuous communication mode.

When an error is detected in step 905 (e.g., yes in step 905), theprocessor 120 performs a device connection operation in step 909. Whenan error occurs in the continuous communication mode, the processor 120may perform temporary disconnection (or separation) from the target andmay attempt to reconnect to the target. The processor 120 may performon-off (e.g., RF field on/off) control of electromagnetic waves (or RFfield) that enables the initiator to supply power to the target.

In step 911, the processor 120 selects an application. The processor 120may reset application information (AID) about an application forcontinuous communication with an application on the target.

In step 913, the processor 120 recovers data. When an error occursduring repeated data transfer (e.g., continuous communication) betweenthe initiator and the target, the processor 120 may perform automaticrecovery of relevant data. When an error is detected during continuouscommunication, a packet (e.g., a sub-packet) transmitted at thecorresponding time may be subject to loss (e.g., packet loss). Thus,data may be recovered by retransmitting a packet (e.g., retransmittingdata) transmitted at the time when an error is detected. The processor120 may recover data by retransmitting the first sub-packet associatedwith the first command.

After performing step 913, the processor 120 may go to step 903 and mayperform step 903 and subsequent operations. For example, the processor120 may determine a state in step 903, and may transmit the secondcommand in step 907 when no error is detected, thereby continuing datatransmission by resolving an error.

According to an embodiment, an operating method of an electronic deviceincludes detecting a trigger to initiate contactless communication(e.g., NFC, RFID communication, or MST communication) with a differentelectronic device, determining a communication type associated withcommunication to be performed with the different electronic device upondetecting the trigger, setting at least one parameter associated withcontinuous communication when the communication type is the continuouscommunication, and performing the continuous communication with thedifferent electronic device on the basis of the set parameter.

Detecting the trigger may include determining an operating mode of theelectronic device upon detecting the trigger.

Determining the operating mode may include setting a mode for thecontinuous communication when the electronic device is determined tooperate as an initiator.

Setting the parameter may include configuring data for the continuouscommunication when the electronic device is determined to operate as theinitiator.

Configuring the data may include dividing additional data associatedwith the data into at least one sub-packet on the basis of a set datasize.

Performing the continuous communication may include configuring acommand for each sub-packet associated with the data, receiving a firstresponse to a first command associated with a first sub-packet from thedifferent electronic device, and continuously transmitting a secondsub-packet, which follows the first sub-packet, and a second commandassociated with the second sub-packet to the different electronic deviceupon receiving the first response.

Performing the continuous communication may include determining at leastone set state upon transmitting the first command, and performing datarecovery associated with the first sub-packet when detecting an error onthe basis of the determined state.

Performing the continuous communication may include setting a commandcount corresponding to the first sub-packet or the second sub-packet,and continuously transmitting one or more of the first or the secondsub-packets up to a final sub-packet on the basis of the commandcounter.

Determining the operating mode may include setting a card emulation modewhen the electronic device is determined to operate as a target.

Performing the continuous communication may include receiving aplurality of sub-packets on the basis of the continuous communicationwith the different electronic device after setting the card emulationmode, and processing the received sub-packets as one piece of data whendetecting a final sub-packet on the basis of a command counter.

While the present disclosure has been particularly shown and describedwith reference to certain embodiments thereof, it will be understood bythose of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the disclosure as defined by the appended claims and theirequivalents.

What is claimed is:
 1. An electronic device comprising: a communicationinterface operable to perform contactless communication with an externaldevice; and a processor operable to control to: determine acommunication type to be performed with the external device; when thecommunication type is a first type of continuous communication,configure data in a long packet structure; when the communication typeis a second type of discontinuous communication, configure data in ashort packet structure; and perform data communication in the continuouscommunication or in the discontinuous communication with the externaldevice on the basis of the determined communication type.
 2. Theelectronic device of claim 1, wherein the processor is operable tocontrol to determine an operating mode of the electronic device upondetecting a trigger to initiate contactless communication with theexternal device.
 3. The electronic device of claim 2, wherein theprocessor is operable to control to determine a mode for the continuouscommunication when the electronic device is determined to operate as aninitiator.
 4. The electronic device of claim 3, wherein the processor isoperable to control to configure data for the continuous communicationwhen the electronic device is determined to operate as the initiator. 5.The electronic device of claim 4, wherein the processor is operable tocontrol to divide additional data associated with the data into at leastone sub-packet on the basis of a set data size.
 6. The electronic deviceof claim 5, wherein the processor is operable to control to: configure acommand for each sub-packet associated with the data; receive a firstresponse to a first command associated with a first sub-packet from theexternal device; and continuously transmit a second sub-packet, whichfollows the first sub-packet, and a second command associated with thesecond sub-packet to the external device upon receiving the firstresponse.
 7. The electronic device of claim 6, wherein the processor isoperable to control to: determine at least one set state upontransmitting the first command; and perform data recovery associatedwith the first sub-packet when detecting an error on the basis of thedetermined state.
 8. The electronic device of claim 5, wherein theprocessor is operable to control to: set a command count correspondingto the first sub-packet or the second sub-packet; and continuouslytransmit at least one or more of the first or the second sub-packets upto a final sub-packet on the basis of the command count.
 9. Theelectronic device of claim 1, wherein the processor is operable tocontrol to: set at least one parameter associated with continuouscommunication when the communication type is the first type of thecontinuous communication; perform data communication in the continuouscommunication with the external device on the basis of the setparameter; and perform data communication in the discontinuouscommunication with the external device when the communication type isthe second type of the discontinuous communication.
 10. The electronicdevice of claim 1, wherein the processor is operable to control to: seta card emulation mode when the electronic device is determined tooperate as a target; receive a plurality of sub-packets on the basis ofthe continuous communication with the external device after setting thecard emulation mode; and process the received plurality of sub-packetsas one piece of data when detecting a final sub-packet on the basis of acommand counter.
 11. The electronic device of claim 1, wherein thecontactless communication comprises at least one of near-fieldcommunication (NFC), radio-frequency identification (RFID)communication, and magnetic secure transmission (MST) communication. 12.An operating method of an electronic device, the method comprising:determining a communication type to be performed with an externaldevice; when the communication type is a first type of continuouscommunication, configuring data in a long packet structure; when thecommunication type is a second type of discontinuous communication,configuring data in a short packet structure; and performing datacommunication in the continuous communication or in the discontinuouscommunication with the external device on the basis of the determinedcommunication type.
 13. The method of claim 12, further comprising:detecting a trigger to initiate contactless communication with theexternal device; and determining an operating mode of the electronicdevice upon detecting the trigger.
 14. The method of claim 13, whereindetermining the operating mode comprises setting a mode for thecontinuous communication when the electronic device is determined tooperate as an initiator.
 15. The method of claim 14, further comprising:setting at least one parameter associated with continuous communicationwhen the communication type is the first type of the continuouscommunication, wherein setting the parameter comprises configuring datafor the continuous communication when the electronic device isdetermined to operate as the initiator, and wherein configuring the datacomprises dividing additional data associated with the data into atleast one sub-packet on the basis of a set data size.
 16. The method ofclaim 15, wherein performing the continuous communication comprises:configuring a command for each sub-packet associated with the data;receiving a first response to a first command associated with a firstsub-packet from the external device; and continuously transmitting asecond sub-packet, which follows the first sub-packet, and a secondcommand associated with the second sub-packet to the external deviceupon receiving the first response.
 17. The method of claim 16, whereinperforming the continuous communication further comprises: determiningat least one set state upon transmitting the first command; andperforming data recovery associated with the first sub-packet whendetecting an error on the basis of the determined state.
 18. The methodof claim 15, wherein performing the continuous communication comprises:setting a command count corresponding to a first sub-packet or a secondsub-packet; and continuously transmitting one or more of the first orthe second sub-packets up to a final sub-packet on the basis of thecommand count.
 19. The method of claim 12, further comprising:performing data communication in the continuous communication with theexternal device on the basis of the set parameter; and performing datacommunication in the discontinuous communication with the externaldevice when the communication type is the second type of thediscontinuous communication.
 20. The method of claim 12, whereinperforming the continuous communication comprises: setting a cardemulation mode when the electronic device is determined to operate as atarget; receiving a plurality of sub-packets on the basis of thecontinuous communication with the external device after setting the cardemulation mode; and processing the received sub-packets as one piece ofdata when detecting a final sub-packet on the basis of a commandcounter.